Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed. NAND flash memory (also referred to as just NAND memory) is a high density type of read-write memory that may be programmed and read in blocks or pages. NAND memory is used in memory cards, USB flash drives, solid-state drives, and similar products, for general storage and transfer of data, as well as being used to store configuration data in numerous digital devices.
Read-only memory (ROM) is a class of storage medium used in computers and other electronic devices. Traditional ROM is read-only memory and cannot be modified, or can be modified only slowly or with difficulty, so it is mainly used to distribute firmware. Firmware refers to software specifically designed for particular hardware. Changing the firmware of a device may rarely or never be done during its economic lifetime. Common reasons for updating firmware include fixing bugs or adding features to the hardware for which it is used. One way to update firmware is to reprogram with a special procedure flash memory used with the ROM. Unlike ROM, NAND memory can be erased and re-programmed multiple times.
NAND memory is typically organized in a number of blocks and each block consists of a number of pages. When the length of an actual page or block of NAND memory is set by a manufacturer, it is permanently fixed at that length. A “block” as it relates to computer memory, and particularly NAND memory, comprises a sequence of storage bytes or bits, having a nominal length. That length is referred to as the block size. The process of storing data into blocks is normally accomplished a whole page at a time, while erasing data is done in units of blocks.
Each block may also be organized into a number of pages, which are typically 2,048 bytes (˜2 KB) or 4,096 bytes (˜4 KB) in size. Associated with at least one page of each block are a few bytes (typically 1/32 of the data size) that can be used for storage of an error correcting code (ECC) checksum. Typical block sizes include:
64 pages, each having 2,048 bytes (˜2 KB) and a spare region of 64 bytes, which means a block size of 128 KB (for page data) and 4 KB (for spare data such as error correction codes, bad block information, metadata, etc.);
64 pages, each having 4,096 bytes (˜4 KB) and a spare region of 128 bytes, which means a block size of 256 KB for page data; and
128 pages, each having 2,048 bytes (˜2 KB) and a spare region of 128 bytes, means a block size of 256 KB for page data.
Manufacturing defects often occur in the fabrication of NAND memories, which can render some memory cells non-functional and unusable. Those blocks including a defective memory cell or cells are referred to as “bad blocks.” Due to manufacturing processes, many NAND devices are shipped from the factory with some bad blocks. For example, by allowing some bad blocks, the manufacturers achieve far higher yields than would be possible if all blocks had to be verified good. This significantly reduces NAND flash costs and only slightly decreases the storage capacity of the parts. Nonetheless, manufactures of NAND memory generally guarantee that the initial block (Block 0) is good, but the remaining data blocks are not guaranteed.
Some bad block management schemes place information on the NAND memory identifying bad blocks on the chip. Such bad block information may include a list indicating either the good blocks which store the image to be accessed or the bad blocks to be skipped. However, variables in the characteristics of the NAND memory itself, as well as reseller and/or manufacturer specific bad block detection schemes/formats too often require customized NAND memory handling and programming.
Additionally, ROM firmware design in computing devices is somewhat restrained compared to software because these routines cannot be practically rewritten later in the development cycle and are generally permanently set once the computing device is manufactured. Consequently, flash memory is used to run boot loader routines since all or part of the data image on a flash memory can be rewritten and thus updated. As used herein, the term “data image” refers to the information stored in one or more memory cells of a read-write memory device, such as a NAND memory device. The data images run off flash memory for contemporary boot loaders tend to be complicated, since they try to accommodate NAND device-specific characteristics, which as noted above vary greatly among resellers and manufacturers.